﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Diagnostics;
using System.ComponentModel;
using WPFExcelReport.Helpers;
using System.Windows.Input;
namespace WPFExcelReport
{
    public partial class TUWT
    {
        public TUWT()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VWTSAER();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void OnEXAUFChg(string vlaue)
        {
            TBMain.Clear();

            if (EXAUF.Length < 15)
                return;

            dwData = TBMain.NewRow();
            dwData["WTBMANDANT"] = app.Mandant;
            dwData["WTBSRFNR"] = EXAUF.Substring(0, 15);
            switch (JWP)
            {
                case "J":
                    SResult = TMV.QWT04(dwData);
                    break;
                case "W":
                    SResult = TMV.QWT05(dwData);
                    break;
            }

            MergeData(SResult, false);

            base.OnEXAUFChg(vlaue);
        }


    }
}
